<?php

namespace maoxuner\LaravelJsonRpc\Exceptions;

use Throwable;

/**
 * Reserved for implementation-defined server-errors.
 */
class ServerException extends RpcException
{
    public function __construct(string $message = 'Server error', int $code = -32000, ?Throwable $previous = null)
    {
        if ($code < -32099 || $code > -32000) {
            $code = -32099;
        }
        parent::__construct($message, $code, $previous);
    }
}
